package cn.lstf666.springboot.web;


import cn.lstf666.springboot.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

//@Controller
@RestController
public class indexController {

    @Autowired
    private StudentService studentService;


    @RequestMapping(value = "/update1")
    public  String updateStudent1(Integer id,String name){

        return "修改结果"+studentService.updateStudent(id,name);
//        return "hello,getMan";
    }


    @GetMapping("/update")
//    @RequestMapping(value = "/update",method = RequestMethod.GET)
    public  String updateStudent(Integer id,String name){

//        return "修改结果"+studentService.updateStudent(id,name);
        return "hello,getMan";
    }

}
